<template>
	<div class="wrap">
	<xcl-header :show="loading.show" :call-back="()=>{}" :page-title="pageTitle" :header-right="headerRight"></xcl-header>
	<div class="content">
		<div class="card" style="margin:0">
	      	<ul>
	      		<li class="row descrip-item">
	      			<div class="col-25">团队全称</div>
	      			<div class="col-75">{{teamInfo.n}}</div>
	      		</li>
	      		<li class="row descrip-item">
	      			<div class="col-25">核心人物</div>
	      			<div class="col-75">{{managerInfo.n}}</div>
	      		</li>
	      		<li class="row descrip-item">
	      			<div class="col-25">所在地区</div>
	      			<div class="col-75">{{teamInfo.p1+teamInfo.c1}}</div>
	      		</li>
	      		<li class="row descrip-item">
	      			<div class="col-25">成立日期</div>
	      			<div class="col-75">{{teamInfo.ed | getLastTimeStr}}</div>
	      		</li>
	      		<li class="row descrip-item">
	      			<div class="col-25">投研人数</div>
	      			<div class="col-75">{{teamInfo.pn1}}</div>
	      		</li>
	      		<li class="row descrip-item">
	      			<div class="col-25">投资经理</div>
	      			<div class="col-75">张三 李四 王五</div>
	      		</li>
	      		<li class="row descrip-item">
	      			<div class="col-25">管理规模</div>
	      			<div class="col-75">{{teamInfo.fs}}万元</div>
	      		</li>
	      		<li class="row descrip-item">
	      			<div class="col-25">产品总数</div>
	      			<div class="col-75">{{teamInfo.pc}}只</div>
	      		</li>
	      		<li class="row descrip-item" style="border:0">
	      			<div class="col-25">代表产品</div>
	      			<div class="col-75">{{productInfo.a}}</div>
	      		</li>
	      	</ul>
		</div>
		<div class="card-title">团队简介</div>
		<div class="card" style="margin:0">
		    <div class="card-content">
		      <div class="card-content-inner">{{teamIdea.investment}}</div>
		    </div>
		</div>
		<div class="card-title">投资理念</div>
		<div class="card" style="margin-top:0">
		    <div class="card-content">
		      <div class="card-content-inner">{{{teamDesc.description}}}</div>
		    </div>
		</div>
	</div>
	</div>
</template>
<script>
	import xclHeader from '../components/header.vue'
	let InvestTeamProxy = require("../proxy/invest_team_proxy");
	let ProductProxy =  require("../proxy/product_proxy");
	let InvestTeam = new InvestTeamProxy;
	let product = new ProductProxy();
	export default {
		data(){
			return{
				pageTitle:'策略团队',
				productSId:this.$route.params.sid,
				teamId:this.$route.params.Id,
				managerId:this.$route.params.mid,
				teamInfo:{},
				managerInfo:{},
				productInfo:{},
				teamDesc:{},
				teamIdea:{},
				loading:{
                    show:false,
                    showTxt:'数据加载中...'
                }
			}
		},
		ready(){
			this.getInvestTeamInfo();
		},
		methods:{
			getInvestTeamInfo(){
				var _this=this;
				InvestTeam.getTeamById(_this.teamId,function(data){
					if(data.code === 200 && data.results && data.results.length){
						_this.teamInfo=data.results[0];
					}
				});
				InvestTeam.getInverstManager(_this.managerId,function(data){
					if(data.code === 200 && data.results && data.results.length){
						_this.managerInfo=data.results[0];
					}
				});
				
				product.getProduct(_this.productSId,function(data){
					if(data.code === 200 && data.results && data.results.length){
						_this.productInfo=data.results[0];
					}
				});
				InvestTeam.getTeamById(_this.teamId,function(data){
					if(data.code === 200 && data.results && data.results.length){
						InvestTeam.getTeamIdeaMap(data.results[0].sid,function(d){
							if(d.code === 200 && d.results && d.results.length){
								_this.teamIdea=d.results[0];
							}
						});
						InvestTeam.getTeamDescriptionMap(data.results[0].sid,function(d){
							if(d.code === 200 && d.results && d.results.length){
								_this.teamDesc=d.results[0];
							}
						});
					}
				});
			}
		},
		components:{
           "xclHeader":xclHeader,          
        }
	}
</script>
<style lang="stylus">
ul{
	margin:0;
	padding:0;
	list-style: none;
}
.descrip-item{
	padding: 0.5rem 0;
	margin:0 0.3rem;
  	border-bottom: 1px solid #dadada;
}
.card-title{
	padding:0.3rem 0.5rem;
	font-size:0.75rem;
}
</style>